package com.test4.bean;

import com.test4.ex.SecurityException;

/**
 * 铁玉门
 *
 * @author Cc
 * 2024-03-12
 */
public class IronJadeDoor extends Door {
    void Security() {
        try {
            throw new SecurityException();
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * 辟邪
     */
    public void WardOffEvil() {
        System.out.println("妖魔鬼怪快离开");
    }

    @Override
    void open() {
        System.out.println("玉门开了");
    }

    @Override
    void close() {
        System.out.println("玉门关了");
    }
}
